package com.rainbow.bam.action;

import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.rainbow.bam.service.account.HtAccountService;
import com.rainbow.bam.service.resource.HtSourceService;
import com.rainbow.bam.service.shiro.ShiroDbRealm.ShiroUser;

/**
 * 
 * 菜单主入口控制类
 * @author zhaolei
 * @version $Id: IndexController.java, v 0.1 2015年11月13日 上午11:04:15 zhaolei Exp $
 */
@Controller
public class IndexController {

    @Autowired
    private HtSourceService htSourceService;

    @Autowired
    private HtAccountService htAccountService;

    @RequestMapping("/menu")
    public String index(Model model) {
        ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal();
        // Set<String> permissions = htAccountService.findPermissions(user.getAcctName());
        //List<HtSource> menus = htResourceService.findMenus(permissions);
        //  model.addAttribute("menus", menus);
        return "base/index";
    }
}
